package org.neuedu.chapter06_0621.demo09;

public class Service {

    public String loginCheck(Userinfo userinfo) {
        System.out.println(userinfo.getName());
        System.out.println(userinfo.getPassword());
        return null;
    }

    public String loginCheck2(String name,String password) {
        System.out.println(name);
        System.out.println(password);
        return null;
    }

    public String isAdult(Userinfo userinfo) {
        if (userinfo.getAge() > 18) {
            return "成年人";
        }
        return "未成年";
    }
}
